{% extends 'Admin/index.html' %}

{% block title %}编辑设备{% endblock %}

{% block elseinclude %}
<style>
	.group {
		margin: 10px auto;
	}

	button {
		width: 100%;
		margin: 5px auto;
	}
</style>
{% endblock %}

{% block subject %}
<header>
	<!--首页导航	-->
	<ul class="layui-nav" style="display:flex;justify-content:center;">
		<li class="layui-nav-item layui-this">
			<a href="/superadmin/editwasher/{{washer_id}}" style="font-size:24px;">管理员</a>
		</li>
	</ul>
</header>

<main style="margin-top:5%;">
	<div style="width:33%;margin:0 auto;font-size:24px;">
		<form id="washerinfo" class="layui-form" action="/superadmin/editwasher/{{washer_id}}" method="post">
			{% csrf_token %}
			{% for w in washer.values %}
			<div class="layui-form-item">
				<div class="group">
					<label class="layui-form-label">设备ID</label>
					<div class="layui-input-block">
						<input class="layui-input" type="text" disabled placeholder="{{w.wmid}}">
					</div>
				</div>
				<div class="group">
					<label class="layui-form-label">状态</label>
					<div class="layui-input-block">
						<select name="washerstate" required>
							<option value="False">可用</option>
							<option value="True">不可用</option>
						</select>
					</div>
				</div>
				<div class="group">
					<div class="layui-input-block">
						<button class="layui-btn" type="submit">保存</button>
					</div>
					<div class="layui-input-block">
						<button class="layui-btn layui-btn-primary layui-border-red" type="reset">重置</button>
					</div>
				</div>
			</div>
			{% endfor %}
		</form>
	</div>
</main>

<footer>

</footer>

<script>
	layui.use('form', function() {
		var form = layui.form;
	})
</script>
{% endblock %}
